package com.it.condition;

import org.springframework.context.annotation.ImportSelector;
import org.springframework.core.type.AnnotationMetadata;

/**
 *
 *
 * @author agstar
 * @date 2019/6/15 15:31
 */
public class MyImportSelector implements ImportSelector {
    /**
     * AnnotationMetadata:当前标注@Import注解的类的所有注解信息
     * @return 返回需要导入的组件的全类名数组
     * @author agstar
     * @date 2019/6/15 15:28
     */
    @Override
    public String[] selectImports(AnnotationMetadata importingClassMetadata) {

        System.out.println(importingClassMetadata);


        return new String[]{"com.it.bean.Blue","com.it.bean.Yellow"};
    }
}
